package com.bvgol.example.rabbitmq.listener;

import com.bvgol.example.rabbitmq.constant.Name;
import com.bvgol.example.rabbitmq.entity.OrderEntity;
import com.bvgol.example.rabbitmq.entity.OrderReturnReasonEntity;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Service;

/**
 * @program: my-spring-completely
 * @description: 一个队列接收到不同的参数对象时使用
 * @author: GUOCHEN
 * @create: 2023/03/16 15:48
 */
//@Service
//@RabbitListener(queues = {Name.queueName})
public class OrderListener2 {
//   @RabbitHandler
//    public void receiveMessage1(Object message, OrderReturnReasonEntity reasonEntity){
//        System.out.printf("message"+ message);
//        System.out.println("reasonEntity = " + reasonEntity.getClass());
//    }
//    @RabbitHandler
//    public void receiveMessage(Object message, OrderEntity entity){
//        System.out.printf("message"+ message);
//        System.out.println("entity = " + entity.getClass());
//    }
}
